package week10;
import java.util.*;
class PrintTask implements Runnable{
	int num;
	public PrintTask(int num) {
		this.num=num;
	}
	public void run(){
		for(int i=0;i<num;i++){
			System.out.println(i);
		}
		System.out.println(Thread.currentThread().getName());
	}
	
}
public class ptahanshu02 {
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintTask task = new PrintTask(Integer.parseInt(sc.next()));
        Thread t1 = new Thread(task);
        t1.start();
        sc.close();
    }

}
